//LEDSmartSquare.c
#include <avr/io.h>
#include <util/delay.h>
int main (void)
{	
	DDRD = 0xFF;		//set PORTD for output
	PORTD = 0;			//stop both motors
	DDRB = 0xFF;
	PORTB = 0;
	
	for (int i = 1; i <= 10; i = i +1) 		//Pause to let get out of the way
	{
		_delay_loop_2(30000);
	}
	
		//** Side**
	
		
	for (int i = 1; i <= 5; i = i +1)
	{
			
		//**FORWARD 1**
	PORTB = 1;
	PORTB = 2;
	PORTD = 3;
	for (int i = 1; i <= 10; i = i +1)
	{
		_delay_loop_2(30000);
	}
	
		//**TURN **
	PORTB = 0;
	PORTD = 1;
	PORTB = 1;
	for (int i = 1; i <= 7; i = i +1)
	{
		_delay_loop_2(27000);
	}
	PORTD = 0;
	PORTB = 0;
	}
	
}
